<?php

/**
 * Yii Controller StatisticController
 *
 * @author nguyenmanhluu
 * @since Sep 13, 2013 - 6:31:18 PM
 */
class StatisticController extends BackController
{

    public $modelName = 'StatCounter';

    public function init()
    {
        parent::init();
        $this->controllerMenu = array();
    }

    public function actionIndex()
    {
        $hourly        = StatCounter::hourly();
        $weekday_stats = StatCounter::weekdaily();
        $weekdaily     = StatCounter::getStat(StatCounter::DATA_HOURLY);
        $this->render('index', array(
            'hourly'        => $hourly,
            'weekdaily'     => $weekdaily,
            'weekday_stats' => $weekday_stats,
        ));
    }

}

/** 
 * End file StatisticController
 */
